<template>
  <div class="img-wrap article">
    <p class="title">{{title}}</p>
    <div v-html="detail"></div>
  </div>
</template>
<script>
import { wxshare } from 'common/mixin';
import { mapGetters, mapActions } from 'vuex';
export default {
  mixins: [wxshare],
  data() {
    return {
      detail: '',
      title:''
    }
  },
  methods: {
    ...mapActions({
      GetArticleList: 'GetArticleList',
      GetArticleDetail: 'GetArticleDetail',
    })
  },
  mounted() {
    this.GetArticleDetail({ id: this.$route.params.id }).then(result => {
      this.detail = result.data.content;
      this.title = result.data.title;
      document.title = result.data.title;
      console.log(this.detail)
    }).catch(() => {})
  }
}
</script>
<style lang="less">
.article {
    // padding: 15px;
    .title{
      border-bottom: 1px solid #edeef3;
    }
    p {
        margin: 10px;
    }
    img {
        width: 100%;
        vertical-align: top;
    }
}
</style>
